Document `include`.
authorHuon Wilson <dbau.pp+github@gmail.com>
Tue, 24 Mar 2015 10:26:25 +0000 (21:26 +1100)
committerHuon Wilson <dbau.pp+github@gmail.com>
Tue, 24 Mar 2015 10:26:25 +0000 (21:26 +1100)
src/doc/manifest.md

index a58757c7a31a62e78f5a8c654ab500ba726fbb42..fc2158d9c6b33def92d67dc8d04781405e81b7b8 100644 (file)
@@ -38,12 +38,14 @@ found in the build script [guide][1].
 build = "build.rs"
 ```
 
-## The `exclude` Field (optional)
+## The `exclude` and `include` Fields (optional)
 
-You can explicitly specify to Cargo that a set of globs should be ignored for
-the purposes of packaging and rebuilding a package. The globs specified in this
-field identify a set of files that are not included when a package is published
-as well as ignored for the purposes of detecting when to rebuild a package.
+You can explicitly specify to Cargo that a set of globs should be ignored or
+included for the purposes of packaging and rebuilding a package. The globs
+specified in the `exclude` field identify a set of files that are not included
+when a package is published as well as ignored for the purposes of detecting
+when to rebuild a package, and the globs in `include` specify files that are
+explicitly included.
 
 If a VCS is being used for a package, the `exclude` field will be seeded with
 the VCS's ignore settings (`.gitignore` for git for example).
@@ -54,6 +56,15 @@ the VCS's ignore settings (`.gitignore` for git for example).
 exclude = ["build/**/*.o", "doc/**/*.html"]
 ```
 
+```toml
+[package
+# ...
+include = ["src/resource.data"]
+```
+
+The options are mutually exclusive: setting `include` will override an
+`exclude`.
+
 ## Package metadata
 
 There are a number of optional metadata fields also accepted under the